package io.renren.modules.sys.config;

import io.renren.modules.sys.interceptor.SysAuthorizationInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * MVC配置
 *
 * @author zyj
 * @email
 * @date 2019.1.9
 */
@Configuration
public class SysWebMvcConfig implements WebMvcConfigurer {
    @Autowired
    private SysAuthorizationInterceptor sysAuthorizationInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(sysAuthorizationInterceptor).addPathPatterns("/sys/**");
    }


}